Skip to content

Pattern miner: Add repo-qa-assistant curated pattern: slash-command Q&A agent - #270

Merged
pelikhan merged 1 commit into
mainfrom
add-repo-qa-assistant-archetype-5eb7a8cd6835a020
Sep 9, 2026
Merged

Pattern miner: Add repo-qa-assistant curated pattern: slash-command Q&A agent#270
pelikhan merged 1 commit into
mainfrom
add-repo-qa-assistant-archetype-5eb7a8cd6835a020

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Mined pattern

Repositories/files mined:

  • githubnext-agentics/files/workflows/repo-ask.md
  • githubnext-agentics/files/workflows/q.md
  • githubnext-agentics/files/workflows/archie.md
  • Confirmed as a recommended, documented pattern (not just recurring code) in github-gh-aw/files/.github/aw/workflow-patterns.md ("Prefer slash_command when the action is conversational... the user may pass arguments in the comment body") and github-gh-aw/files/.github/aw/patterns.md (ChatOps: "slash-command driven, human-in-the-loop automation in issues or pull requests").

Recurring shape (3 upstream workflows):
All three (repo-ask, q, archie) are conversational, on-demand assistants that:

  • trigger on slash_command (optionally paired with a reaction for immediate acknowledgement)
  • run with read-only/minimal permissions (permissions: read-all or explicit contents/issues/pull-requests: read)
  • use tools.github.min-integrity: none so they can read any issue/PR regardless of author trust, since they only answer questions and never act on untrusted content
  • investigate via bash/web-fetch/github tools rather than making repository changes
  • respond with a single add-comment (capped at max: 1), never create-pull-request or other write outputs

This satisfies the "at least two upstream workflows demonstrating the same shape" bar, and is additionally corroborated by explicit upstream documentation recommending the slash_command-driven ChatOps pattern for conversational actions.

Why the existing library did not cover this:

  • pr-iteration-loop is PR-focused, long-running iteration on a draft PR — not read-only Q&A.
  • repo-maintainer is a broad, proactive scheduled maintenance role with write outputs (issues + PRs) — not a read-only, on-demand answer-and-comment assistant.
  • No existing archetype captures the "slash-command triggered, read-only investigation, single comment answer" shape, and no trigger-combo/tip in current-library.json documents the min-integrity: none + read-only + single add-comment combination for this use case.

What changed in patterns/:

  • Added patterns/archetypes/repo-qa-assistant.json — new curated archetype (success_rate: null, count: 0, top_repos: []) with slash_command trigger, add-comment safe output/tool, role-steps prompt style, and tips capturing the reaction-ack, read-only-permissions, min-integrity: none, add-comment max: 1, and scoped-answer patterns observed upstream.
  • Appended repo-qa-assistant to archetypes in patterns/manifest.json.
  • Added the repo-qa-assistant runtime rendering definition (icon, capabilities, permissions, github_toolsets, prompt body) to patterns/workflow-generation.json.

No other files were touched; no scan/generation scripts were run.

Validation:

  • npm test — 320 tests passed (18 test files), including test/patterns.test.js and test/generate-patterns.test.js. One unrelated ENOENT warning from vitest's GitHub Actions summary reporter trying to write to a runner temp path that doesn't exist in this sandbox; it does not affect test results.
  • npm run build — succeeded, producing dist/patterns/archetypes/repo-qa-assistant.json and the updated dist/patterns/manifest.json / dist/patterns/workflow-generation.json.

Candidates deliberately left out:

  • plan.md (Agentic Planner) — only one upstream example with no corroborating "planning discussion" pattern doc; would need a second example.
  • dictation-prompt.md — a narrow, single-purpose voice-dictation prompt generator with no second upstream example or documented pattern.
  • sub-issue-closer.md / issue-arborist.md — both overlap with the existing issue-hierarchy-manager archetype (parent/sub-issue linking and closing), so no new archetype was warranted; left the existing archetype's link-sub-issue/update-issue tips untouched since upstream evidence did not add anything new.
  • duplicate-code-detector.md / large-file-simplifier.md / code-simplifier.md — already covered by the existing code-health-auditor and performance-nut archetypes.

Generated by Pattern Miner · copilot · auto · 93.6 AIC · ⌖ 12.2 AIC · ⊞ 8.5K ·

Interactive slash-command Q&A agent that investigates the repository
and answers with a single comment. Mined from upstream
githubnext/agentics repo-ask.md, q.md, and archie.md, which share
slash_command + reaction triggers, read-only permissions, and a
single add-comment safe output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 9, 2026 05:33
@pelikhan
pelikhan merged commit b90032b into main Sep 9, 2026
1 check passed
@pelikhan
pelikhan deleted the add-repo-qa-assistant-archetype-5eb7a8cd6835a020 branch September 9, 2026 05:33

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer kind: matt-pocock (data-only JSON pattern addition, TS/generation-logic focused).

Found two correctness gaps between the new repo-qa-assistant archetype data and how src/js/workflow.js actually renders workflows:

  1. capabilities.web_fetch in workflow-generation.json isn't a recognized key in inferCapabilities() — it silently has no effect, so the generated tools block won't include web-fetch despite the prompt instructing the agent to use it.
  2. The archetype's tips describe setting min-integrity: none, but the corresponding min_integrity field is missing from the workflow-generation.json entry, so the generated frontmatter won't include it.

Both are inline comments above. No blocking issues beyond that — the rest of the archetype/manifest wiring looks consistent with existing patterns.

Generated by Specialist PR Review for #270 · copilot · auto · 37.5 AIC · ⌖ 5.74 AIC · ⊞ 8.1K

"icon": "comment-discussion",
"capabilities": {
"bash": true,
"web_fetch": true,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matt-pocock: capabilities.web_fetch isn't read anywhere in src/js/workflow.jsinferCapabilities() only maps pre_steps, bash, github_toolsets, browser, network (see lines 48-57). This key is silently dropped, so generated workflows will never emit a web-fetch tool despite step 2 of the prompt body explicitly instructing the agent to "Investigate the repository... using bash and web-fetch as needed". Either rename to browser/an existing recognized capability, or add web_fetch handling to inferCapabilities/generateWorkflowFile so the tool actually gets included.

"Use a reaction (e.g. eyes) alongside slash_command so requesters get immediate acknowledgement while the agent works",
"Grant read-only permissions and rely on bash/web-fetch tools for investigation instead of write access",
"Set tools.github.min-integrity: none so the assistant can read any issue or pull request context regardless of author trust, since it only answers questions",
"Cap add-comment at max: 1 so a single consolidated answer is posted instead of a running commentary",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matt-pocock: This tip says "Set tools.github.min-integrity: none", but there's no corresponding "min_integrity": "none" field added to the repo-qa-assistant entry in patterns/workflow-generation.json (compare status-report, which does set min_integrity). Without it, generateWorkflowFile won't emit min-integrity: none in the frontmatter, so the generated workflow won't actually match this tip's stated behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant